const path = require('path');
const resolve = dir => path.join(__dirname, dir);

module.exports = {
  publicPath: './',
  outputDir: "dist",
  assetsDir: 'static',
  indexPath: 'index.html',
  chainWebpack: config => {
    config.plugins.delete('preload') 
    config.plugins.delete('prefetch') 
    const oneOfsMap = config.module.rule('scss').oneOfs.store;
    oneOfsMap.forEach(item => {
      item
        .use('sass-resources-loader')
        .loader('sass-resources-loader')
        .options({
          resources: ['./src/styles/main.scss']
        })
        .end()
    });
    config.resolve.alias.set('@', resolve('src'));
  },
  runtimeCompiler: true
}